<html>
    <title>风格切换1</title>
<style></style>

<body>
<select name="sel" id="sel">
    <option value="0">男</option>
    <option value="1"> 女</option>
</select>

<h1>面向过程,不用模式来切换</h1>
<div id="test1">11</div>
<div id="test2">22</div>
<div id="test3">33</div>
</body>
<script>
//不用设计模式 只能一个一判断
 var sel = document.getElementById('sel');
sel.onchange = function() {

        if( this. value == '1' ) {
            document.getElementById('test2' ).innerHTML = ' 足球新闻';
            document.getElementById('test3').innerHTML = '大众汽车';
        } else if(this.value == '0') {
            document.getElementById('test2' ).innerHTML = '宋重鸡来华';
            document.getElementById('test3' ).innerHTML ='化妆品';
    }
}
//如果要修改之能一个一个的加 
</script>
</html>